﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Framework_Tool
{
    /// <summary>
    /// Interaction logic for LearnerLogin.xaml
    /// </summary>
    public partial class LearnerLogin : Page
    {
        MainWindow main;

        public LearnerLogin(MainWindow main)
        {
            this.main = main;
            InitializeComponent();
            stdtUsernameTxt.Focus();
        }

        private void stfLogin_Click_1(object sender, RoutedEventArgs e)
        {
            StaffLogin stfLoginWindow = new StaffLogin(main);
            stfLoginWindow.Content = null;
            mainContent.Children.Add(stfLoginWindow.mainContent);
        }

        private void stdtLoginBtn_Click_1(object sender, RoutedEventArgs e)
        {
            main.userLbl.Content = Database.StdtLogin(stdtUsernameTxt.Text, stdtPasswordTxt.Password, main);
        }
    }
}
